<template>
  <div class="storeInventory">
    <div class="od-inp">
      <p>盘点日期</p>
      <el-date-picker
        v-model="checkTime"
        type="date"
        value-format="yyyy-MM-dd HH:mm:ss"
      ></el-date-picker>

      <p>单号</p>
      <el-input v-model="receiptsNumber"></el-input>

      <p>类别</p>
      <el-select v-model="type" clearable>
        <el-option
          v-for="item in typeList"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        ></el-option>
      </el-select>
      <p>盘点序号</p>
      <el-input v-model="sequence"></el-input>
    </div>

    <div class="od-tab">
      <div class="tab-left">
        <div class="left-btn">
          <el-select
            class="update-el-select"
            v-model="reader"
            style="width: 120px; margin-right: 10px"
            @change="readerChange"
          >
            <el-option
              v-for="item in readerList"
              :key="item.equipmentCabinetNo"
              :label="item.equipmentCabinetNo"
              :value="item.equipmentCabinetNo"
            >
            </el-option>
          </el-select>
          <el-button
            :disabled="isRegular"
            @click="readRfid"
            style="margin-left: 35px"
            >读卡</el-button
          >
          <el-button :disabled="isRegular" @click="reduace">减标</el-button>
          <el-button :disabled="isRegular" @click="empty">清空</el-button>
        </div>
        <el-table
          ref="tabData"
          :data="tabData"
          style="width: 100%"
          highlight-current-row
          :header-cell-style="{
            background: '#f4f4f4',
            padding: 0,
            height: '40px'
          }"
          :cell-style="{ padding: 0, height: '26px' }"
          height="70vh"
        >
          <el-table-column type="selection" width="50"> </el-table-column>
          <el-table-column type="index" label="序号" width="50">
          </el-table-column>
          <el-table-column
            prop="showCode"
            label="RFID"
            width="140"
          ></el-table-column>
          <el-table-column
            show-overflow-tooltip
            prop="kindsNumber"
            label="款号"
            width=""
          ></el-table-column>
          <el-table-column
            show-overflow-tooltip
            prop="sellingPrice"
            label="售价"
            width=""
          ></el-table-column>
          <!-- <el-table-column prop="number" label="盘点数量" width=""></el-table-column>
          <el-table-column prop="stockingMoney" label="盘点金额"></el-table-column> -->
        </el-table>
      </div>
      <div class="tab-right">
        <div class="od-btn">
          <el-button
            :disabled="isRegular"
            @click="create"
            icon="el-icon-plus"
            type="primary"
            >新建</el-button
          >
          <el-button
            :disabled="isRegular"
            @click="exp('店铺盘点')"
            icon="el-icon-upload2"
            >导出</el-button
          >
          <!-- <el-button icon="el-icon-download">导入</el-button> -->
          <div class="dr" :disabled="isRegular" @click="Export">
            <i class="el-icon-download"></i>
            导入
            <input
              :disabled="isRegular || Dis2"
              ref="upload"
              accept=".xls, .xlsx"
              class="outputlist_upload"
              type="file"
            />
          </div>
          <el-button :disabled="isRegular" @click="Delete" icon="el-icon-delete"
            >删除</el-button
          >
        </div>
        <el-table
          element-loading-text="拼命加载中"
          element-loading-spinner="el-icon-loading"
          element-loading-background="rgba(0, 0, 0, 0.7)"
          id="outTable"
          :data="tableData2"
          ref="tableData2"
          style="width: 100%"
          :header-cell-style="{
            background: '#f4f4f4',
            padding: 0,
            height: '40px'
          }"
          :cell-style="{ padding: 0, height: '26px' }"
          height="70vh"
        >
          <el-table-column type="selection" width="50"> </el-table-column>
          <el-table-column type="index" label="序号" width="50">
          </el-table-column>
          <template v-for="i in hList">
            <el-table-column
              show-overflow-tooltip
              :prop="i.prop"
              :label="i.label"
              :width="i.width"
              :key="i.prop"
            >
            </el-table-column>
          </template>
        </el-table>
      </div>
    </div>
    <foot-view class="footView">
      <div slot="text">
        <span>数据库：{{ jxQuarter }}</span>
      </div>
    </foot-view>
    <!-- 这个是自己建的组件 -->
    <new-vs
      v-show="showNew"
      :flag="showNew"
      @closeNew="
        () => {
          this.showNew = false
        }
      "
      @saveNew="saveNew"
      @inpNumChange="
        () => {
          this.inpList = this.getInput()
        }
      "
      :sequence1="sequence"
    >
    </new-vs>
  </div>
</template>

<script>
import XLSX from 'xlsx'
import FileSaver from 'file-saver'
import { confirm, orderQuery } from '../../../network/manufacturerOrder'
import footView from '../../../components/FootView'
import newVs from './childComp/newVs'

import outex from '../../../components/mixins/outexp'
import {
  UHFConnection,
  connectStatus,
  close,
  sendOrder,
  orderList,
  getUhfTest
} from '../../../network/rfid'
import { internetProtocol } from '../../../config/ip'
import {
  postData,
  deleteShop,
  reduaceRfid,
  postData1
} from '../../../network/shop'
import today from '../../../components/mixins/today'
import enterUp from '../../../components/mixins/enterUp'
import exportMethods from '../../../components/mixins/exportMethods'
export default {
  name: 'store_take_stock_s',
  mixins: [outex, today, enterUp, exportMethods],
  created() {
    let jxQuarterVal = document.cookie.match(RegExp('jxQuarter' + '=([^;]+)'))
    this.jxQuarter = jxQuarterVal ? jxQuarterVal[1] : null
    
    this.cusNo = localStorage.getItem('sdNo')
    this.inpList = this.getInput()
    if (localStorage.getItem('whatState') == '直营') {
      this.isRegular = false
    } else {
      this.isRegular = true
    }
    getUhfTest().then((res) => {
      this.readerList = res.data.data
      console.log(res.data)
      if (res.data.code == 200) {
        for (let z of res.data.data) {
          this.ip = z.ip
          this.port = z.port
          this.command = z.testHead + z.testBody
        }
        console.log(this.ip, Number(this.port), this.command)
      }
    })
    this.checkTime = this.searchDateWithHour()
  },
  data() {
    return {
      // loading1:false,
      Dis2: true,
      cusNo: '',
      inpList: [],
      isRegular: false,
      jxQuarter: null,
      // jxQuarter: document.cookie.match(
      //   new RegExp('jxQuarter' + name + '=([^;]*)(;|$)')
      // )[1],
      readerList: [],
      reader: '',
      showNew: false,
      checkTime: '',
      receiptsNumber: '',
      type: '',
      typeList: [
        { label: '盘点', value: '盘点' },
        { label: '盘差', value: '盘差' }
      ],

      hList: [
        { prop: 'sequence', label: '盘点序号', width: '140' },
        { prop: 'kindsNumber', label: '款号', width: '120' },
        { prop: 'sellingPrice', label: '售价', width: '100' },
        { prop: 'onePrice', label: '单价', width: '100' },
        { prop: 'number', label: '盘点数量', width: '80' },
        { prop: 'stockingMoney', label: '盘点金额', width: '120' },
        { prop: 'checkTime', label: '盘点日期', width: '120' },
        { prop: 'quarterName', label: '季度', width: '' },
        { prop: 'operator', label: '操作员', width: '120' },
        { prop: 'enteringTime', label: '录入时间', width: '120' }
      ],

      tabData: [],
      tableData2: [],

      kindsNumberList: [],
      styleNumberList: [],
      sid: '',
      command: '',
      port: '',
      ip: '',
      rfidList1: [],
      tabData: [],
      switchList: [],
      efficacious: [],
      loading: [],
      sequence: '',
      ta: [],
      ti: [],
      vipWarehouseCheck: []
    }
  },
  methods: {
    create() {
      this.showNew = true
      this.sequence = ''
      this.tableData2 = []
    },
    Export() {
      if (this.checkTime == null) {
        this.$message.warning({ message: '盘点时间不能为空', offset: 400 })
        this.Dis2 = true
        return
      } else {
        this.Dis2 = false
      }
      if (this.type == '') {
        this.$message.warning({ message: '类别不能为空', offset: 400 })
        this.Dis2 = true
        return
      }
      this.loading
    },
    // 读卡
    readRfid() {
      if (this.receiptsNumber == '' || this.type == '') {
        this.$message({
          type: 'warning',
          offset: 400,
          message: '单号和类别不能为空'
        })
        return
      }
      if (!this.reader) {
        this.$message({
          offset: 400,
          type: 'warning',
          message: '请选择读卡机'
        })
      }
      var sid = Math.random().toString(36).substring(2, 7)
      this.sid = sid
      var ws = new WebSocket(`wss://${internetProtocol}/webSocket/` + sid)
      ws.onopen = (e) => {
        // console.log(e)
        UHFConnection({
          host: this.ip,
          port: Number(this.port),
          socketId: sid
        }).then((res) => {})
        setTimeout(() => {
          connectStatus({ socketId: sid }).then((res) => {
            console.log(res.data)
            if (res.data.code == 200) {
              this.tabData = []
              if (!this.sequence) {
                this.rfidList1 = []
              }
              this.switchList = []
              this.efficacious = []
              this.$message.success({ message: '读卡器连接成功，开始读卡' })
              sendOrder({ command: this.command, connectId: this.sid }).then(
                (res) => {
                  console.log(res.data)
                }
              )
              this.loading = this.$loading({
                lock: true,
                text: '读卡中...',
                spinner: 'el-icon-loading',
                background: 'rgba(255, 255, 255, 0)'
              })
            } else if (res.data.code == 201) {
              this.$message.error({ message: '读卡器连接失败' })
            }
          })
        }, 1500)
      }
      ws.onmessage = (event) => {
        // console.log(event)       webSocket 发送信息
        if (event.data == '连接成功') return
        this.RfidList = JSON.parse(event.data)
        // console.log(this.RfidList) webSocket 发送信息
        if (this.RfidList.endCommand) {
          console.log(this.RfidList.endCommand)
          this.$message.success({ message: '读卡完成' })
          this.loading.close()
          ws.onclose()
          this.rfidAdd()
        }
        if (this.RfidList.isConnectError) {
          this.$message.error(
            `请检查路由器外网IP是否与此IP一致 ：${this.RfidList.connectTimeOutIp}`
          )
          this.loading.close()
          ws.close()
        }
        if (this.RfidList.validShowCode) {
          if (this.rfidList1.length) {
            let exist = 0
            for (const i of this.rfidList1) {
              if (i.showCode == this.RfidList.validShowCode) {
                exist = 1
                break
              }
            }
            if (!exist) {
              this.rfidList1.unshift({ showCode: this.RfidList.validShowCode })
              this.efficacious.push({ showCode: this.RfidList.validShowCode })
            }
          } else {
            this.rfidList1.unshift({ showCode: this.RfidList.validShowCode })
            this.efficacious.push({ showCode: this.RfidList.validShowCode })
          }
          this.tabData.unshift({
            showCode: this.RfidList.validShowCode,
            index: this.tabData.length + 1
          })
        }

        if (this.RfidList.otherErrorRFID) {
          if (this.tabData.length) {
            let exist = 0
            for (const i of this.tabData) {
              if (i.showCode.indexOf(this.RfidList.otherErrorRFID) != -1) {
                exist = 1
                break
              }
            }
            if (!exist) {
              this.tabData.unshift({
                showCode: this.RfidList.otherErrorRFID + '其他错误',
                index: this.tabData.length + 1
              })
            }
          } else {
            this.tabData.unshift({
              showCode: this.RfidList.otherErrorRFID + '其他错误',
              index: this.tabData.length + 1
            })
          }
        }

        if (this.RfidList.antennaErrorRFID) {
          if (this.tabData.length) {
            let exist = 0
            for (const i of this.tabData) {
              if (i.showCode.indexOf(this.RfidList.antennaErrorRFID) != -1) {
                exist = 1
                break
              }
            }
            if (!exist) {
              this.tabData.unshift({
                showCode:
                  this.RfidList.antennaErrorRFID +
                  '天线错误' +
                  this.RfidList.antennaErrorIndex,
                index: this.tabData.length + 1
              })
            }
          } else {
            this.tabData.unshift({
              showCode:
                this.RfidList.antennaErrorRFID +
                '天线错误' +
                this.RfidList.antennaErrorIndex,
              index: this.tabData.length + 1
            })
          }
        }
      }
      ws.onclose = () => {
        console.log('连接关闭')
        // close({socketId:this.sid}).then(res=>{
        //   console.log(res.data)
        // })
      }
      ws.onerror = (event) => {
        console.log(event)
      }
    },
    rfidAdd() {
      var showCodeList = []
      // for(let a1 in this.tabData){
      //   showCodeList.push({showCode:this.tabData[a1]})
      // }
      this.tabData.forEach((e) => {
        showCodeList.push(e.showCode)
      })
      var vipWarehouseCheck = {
        type: this.type == '盘点' ? 0 : 1,
        receiptsNumber: this.receiptsNumber,
        checkTime: this.checkTime,
        customerNo: localStorage.getItem('sdNo')
        // showCodeList,
        // enteringTime:this.enteringTime
      }
      let obj = {
        vipWarehouseCheck,
        showCodeList
      }
      console.log(obj)
      postData(JSON.stringify(obj)).then((res) => {
        console.log(res)
        if (res.data.code == 200) {
          this.tabData = []
          this.tableData2 = []
          res.data.data.resultList.forEach((e) => {
            this.tableData2.push(e)
            this.sequence = e.sequence
            this.enteringTime = e.enteringTime
          })
          for (let d in res.data.data.validList[0]) {
            res.data.data.validList[0][d]['rd'] = 0
          }
          if (res.data.data.noExitList !== undefined) {
            console.log('aa')
            this.exportRaw(String(res.data.data.noExitList), '库存不足Rfid.txt')
          }
          this.tabData = res.data.data.validList[0]
          if (res.data.data.errorRfidList != undefined) {
            this.exportRaw(
              String(res.data.data.errorRfidList),
              '库存不足Rfid.txt'
            )
          }
        }
      })
    },
    //保存
    saveNew(a) {
      console.log(a)
      postData(JSON.stringify(a)).then((res) => {
        console.log(res.data)
        this.showNew = false
        if (res.data.code == 200) {
          this.$message({
            type: 'success',
            message: '保存成功'
          })
          this.tableData2 = res.data.data.resultList
          for (let a of res.data.data.resultList) {
            this.sequence = a.sequence
          }
        } else {
          this.$message.error({
            message: '保存失败'
          })
        }
      })
    },

    readerChange() {},
    //减标
    reduace() {
      if (this.sequence == '') {
        return
      }
      this.ta = this.$refs.tabData.selection
      console.log(this.ta)
      if (this.ta == '') {
        this.$message({
          type: 'warning',
          offset: 400,
          message: '请选择减标数据'
        })
        return
      }
      var rfidList1 = []
      this.ta.forEach((e) => {
        rfidList1.push(e.id)
      })
      var rfidList = JSON.stringify(rfidList1)
        .replace(/\[|]/g, '')
        .replace(/\"|"/g, '') //rfidList 传数组 url : rfidList[]=111
      console.log(rfidList)
      // return
      let obj = { sequence: this.sequence, rfidList }
      console.log(obj)
      this.$confirm('是否删除选中数据 是否确认？', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        reduaceRfid(obj).then((res) => {
          console.log(res.data)
          if (res.data.code == 200) {
            this.$message.success({ message: '减标成功' })

            this.ta.forEach((item, index) => {
              this.tabData.forEach((itemI, indexI) => {
                if (item === itemI) {
                  this.tabData.splice(indexI, 1)
                }
              })
            })
            this.ta.forEach((item, index) => {
              this.tableData2.forEach((item1, index1) => {
                if (
                  item.kindsNumber == item1.kindsNumber &&
                  item1.number == 1
                ) {
                  this.tableData2.splice(index1, 1)
                }
                if (item.kindsNumber == item1.kindsNumber && item1.number > 1) {
                  item1.number -= 1
                }
              })
            }) //删除与左表关联的右表数据
          } else {
            this.$message.error({ message: '减标失败' })
          }
        })
      })
    },
    //清空
    empty() {
      console.log(this.sequence)
      this.$confirm('是否清空此盘点序号的RFID数据 是否确认？', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        reduaceRfid({ sequence: this.sequence, rfidList: '""' }).then((res) => {
          console.log(res.data)
          if (res.data.code == 200) {
            this.$message({
              type: 'success',
              offset: 400,
              message: '清空成功'
            })
            this.tabData.forEach((item, index) => {
              this.tableData2.forEach((item1, index1) => {
                if (item.kindsNumber === item1.kindsNumber) {
                  this.tableData2.splice(index1, 1)
                }
              })
            })
            this.tabData = []
          } else {
            this.$message.error({
              offset: 400,
              message: '清空失败'
            })
          }
        })
      })
    },
    //删除
    Delete() {
      if (this.sequence == '') {
        return
      }
      this.ti = this.$refs.tableData2.selection
      if (this.ti == '' && this.sequence != '') {
        this.$message.warning({ message: '请选中右表数据删除' })
        return
      }
      if (this.ti != '' && this.sequence != '') {
        var checkMap = {}
        this.ti.forEach((e) => {
          checkMap[e.kindsNumber] = e.number
        })
        let vipWarehouseCheck = { sequence: this.sequence }
        let obj = { vipWarehouseCheck, checkMap }
        console.log(obj)
        this.$confirm('是否删除选中数据 是否确认？', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          deleteShop(JSON.stringify(obj)).then((res) => {
            console.log(res.data)
            if (res.data.code == 200) {
              this.$message({
                type: 'success',
                message: '删除成功'
              })
              this.sequence = ''
              this.ti.forEach((item, index) => {
                this.tableData2.forEach((itemI, indexI) => {
                  if (item === itemI) {
                    this.tableData2.splice(indexI, 1)
                  }
                })
              })
            } else {
              this.$message.error({
                message: '删除失败'
              })
            }
          })
        })
      }
    },

    formatDate(numb, format) {
      let time = new Date((numb - 1) * 24 * 3600000 + 1)
      time.setYear(time.getFullYear() - 70)
      let year = time.getFullYear() + ''
      let month = time.getMonth() + 1 + ''
      let date = time.getDate() - 1 + ''
      if (format && format.length === 1) {
        return year + format + month + format + date
      }
      return (
        year +
        '-' +
        (month < 10 ? '0' + month : month) +
        '-' +
        (date < 10 ? '0' + date : date)
      )
    },
    //导入
    readExcel(e) {
      if (this.type == '') {
        this.$message.warning({ message: '请选择类型', offset: 400 })
        return
      }
      //表格导入
      var that = this
      const files = e.target.files
      console.log(files, 'files')
      if (files.length <= 0) {
        //如果没有文件名
        return false
      } else if (!/\.(xls|xlsx)$/.test(files[0].name.toLowerCase())) {
        this.$Message.error('上传格式不正确，请上传xls或者xlsx格式')
        return false
      }
      // this.loading1 = true
      const fileReader = new FileReader()
      console.log(fileReader, 'fileReader')
      fileReader.onload = (ev) => {
        console.log(ev, 'ev')
        try {
          const data = ev.target.result
          // 以二进制流方式读取得到整份excel表格对象
          const workbook = XLSX.read(data, {
            type: 'binary'
          })
          // 返回的是一个包含表格数据的对象
          console.log(workbook, 'workbook')
          const wsname = workbook.SheetNames[0] //取第一张表
          const ws = XLSX.utils.sheet_to_json(workbook.Sheets[wsname]) //生成json表格内容
          console.log(ws, 'ws') // 获取到的是一个数组，数组的每一项就是表格的每一行的数据
          // let wx = JSON.parse(JSON.stringify(ws))//数据后有__object__且显示为(...) 转换为直接可读对象
          // console.log(wx)
          var anumber = []
          var ar = {}
          var showCodeList = []
          var vipWarehouseCheck = []
          //   ws.forEach(el=>{      //ws共1157条数据  ar只循环出1057条 ar循环同样的货号时不会再次添加
          //   // if(v.数据来源 == 1){

          //     // if(v.数量 != ''){
          //       ar[el.货号] = el.数量
          //       // this.dr.push(ws[v].货号)
          // })
          ws.forEach((el) => {
            // 遍历到每一个数据得到key:value值  直接循环的话重复元素不会再加进来
            // anumber.push({[`"${el.货号}"`] : el.数量}) //push 进数组 有相同元素也会push进来  el.数量加[] 数量就会变成数组  //货号加双引号
            // anumber.push({ kindsNumber: el.货号, number: el.数量 })(报错原因，这里是undefined)（导入的excel表格中的每一行中一定要有货号和数量）
            anumber.push({ kindsNumber: el['货号'], number: el['数量'] })
          })
          console.log(anumber) //数据正确
          vipWarehouseCheck = {
            checkTime: this.checkTime,
            receiptsNumber: this.receiptsNumber,
            customerNo: this.cusNo,
            type: this.type == '盘点' ? 0 : 1,
            sequence: this.sequence
            // shopNo:v.店铺编号 == undefined ? '' : v.店铺编号,
            // onePrice:v.售价 == undefined ? '' : v.售价,
            // actualPayment:v.实收单价 == undefined ? '' : v.实收单价,
          }
          // }
          let obj3 = {
            vipWarehouseCheck,
            showCodeList,
            checkMap: {},
            importKindsNumberList: anumber
          }
          console.log(obj3, 'obj3')
          // console.log(JSON.parse(JSON.stringify(this.dr).replace(/^\[|\]$/g,'')))
          //盘点导入
          postData1(JSON.stringify(obj3)).then((res) => {
            // this.loading1 = false
            console.log(res.data, '导入成功返回的数据')
            if (res.data.code == 200) {
              this.$message({
                type: 'success',
                offset: 400,
                message: '导入成功!'
              })
              res.data.data.resultList.forEach((e) => {
                this.tableData2.push(e)
              })
              if (res.data.data.noExitList !== undefined) {
                // console.log('a')
                this.exportRaw(
                  String(res.data.data.noExitList),
                  '库存不足Rfid.txt'
                )
              }

              if (res.data.data.rfidList !== undefined) {
                res.data.data.rfidList.forEach((e) => {
                  this.tabData.push(e)
                })
              } else {
              }

              for (var c of this.tableData2) {
                this.sequence = c.sequence
                // console.log(this.sequence)//序号
                this.houseNo = c.warehouseNo
              }

              // this._getClient({limit: this.limit,page: this.currentPage})//重新请求页面数据
            } else {
              this.$message.error({
                offset: 400,
                message: '导入数据错误'
              })
            }
          })

          that.outputs = [] //清空接收数据
          //编辑数据
          for (var i = 0; i < ws.length; i++) {
            var sheetData = {
              address: ws[i].addr,
              value: ws[i].value
            }
            that.outputs.push(sheetData)
          }
          this.$refs.upload.value = ''
        } catch (e) {
          return false
        }
      }
      fileReader.readAsBinaryString(files[0])
    }
  },
  watch: {
    type(a, b) {
      // console.log(a)
      if (a != '') {
        this.Dis2 = false
      } else {
        this.Dis2 = true
      }
    }
  },
  mounted() {
    this.$refs.upload.addEventListener('change', (e) => {
      //绑定监听表格导入事件
      this.readExcel(e)
    })
  },
  components: {
    footView,
    newVs
  }
}
</script>

<style scoped>
.storeInventory {
  margin-right: 15px;
  padding: 0 15px;
  background-color: white;
  height: 87.5vh;
  position: relative;
}
.od-btn {
  padding: 10px 0;
}
.od-tab {
  display: flex;
}
.tab-left {
  width: 30%;
  padding-right: 15px;
  border-right: 2px solid #f4f4f4;
}
.tab-right {
  padding-left: 15px;
  width: 70%;
}
.footView span {
  float: left;
  margin-right: 48px;
  line-height: 6vh;
  font-size: 14px;
}
.footView span i {
  margin-right: 5px;
}
.od-inp {
  display: flex;
  padding: 10px;
  border-bottom: 1px solid #f6f6f6;
}
.od-inp p:first-child {
  margin: 3px 6px 0 0;
  display: inline-block;
  white-space: nowrap;
  /* width: 48px; */
  /* text-align: right; */
}
.od-inp p:not(:first-child) {
  margin: 3px 6px 0 12px;
  display: inline-block;
  white-space: nowrap;
  /* width: 48px;
    text-align: right; */
}
.left-btn {
  padding: 10px 0;
}
.dr {
  margin-left: 10px;
}
</style>
<style>
.storeInventory .od-inp .el-input__inner,
.storeInventory .od-inp .el-input {
  width: 160px;
  height: 30px;
}
.storeInventory .od-inp .el-input__icon {
  line-height: 31px;
}
.storeInventory .left-btn .el-input__inner {
  height: 30px;
}
</style>
